package tech.xs.common.framework.util;

import tech.xs.common.framework.domain.constant.PackageNames;

import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

public class SpringPackageUtil {

    private final static Set<String> packageNames = new HashSet<>();

    static {
        packageNames.add(PackageNames.BASE);
    }

    public static void addPackage(String packageName) {
        packageNames.add(packageName);
    }

    public static void addPackage(Collection<String> packageNames) {
        packageNames.addAll(packageNames);
    }

    public static Collection<String> getPackageNames() {
        return new HashSet<>(packageNames);
    }

}
